{{ define "main" }}
  {{ $downloadurl := "" }}
  {{ $language := $.Site.Language.Lang }}

  {{ if ne $language "en" }}
    {{ $downloadurl = printf "%s/%s/%s/" $.Site.Params.websiteURL $language "where" }}
  {{ else }}
    {{ $downloadurl = printf "%s/%s/" $.Site.Params.websiteURL "where" }}
  {{ end }}
  <main class="main-wrapper">
    {{ partial "global-search.html" . }}
    <section class="cards-container">
      <div class="card">
        <a href={{ "books/handbook/basics" | absLangURL }}>
          <h5>{{ i18n "getting-started" }}</h5>
          <p>{{ i18n "learn-basics" }}</p>
        </a>
      </div>
      <div class="card">
        <a href={{ $downloadurl }}>
          <h5>{{ i18n "download" }}</h5>
          <p>{{ i18n "download-freebsd" }}</p>
        </a>
      </div>
      <div class="card">
        <a href={{ "books/handbook/" | absLangURL }}>
          <h5>{{ i18n "handbook" }}</h5>
          <p>{{ i18n "handbook-desc" }}</p>
        </a>
      </div>
      <div class="card">
        <a href={{ "books/porters-handbook/" | absLangURL }}>
          <h5>{{ i18n "porters-handbook" }}</h5>
          <p>{{ i18n "porters-handbook-desc" }}</p>
        </a>
      </div>
      <div class="card">
        <a href={{ "books/faq/" | absLangURL }}>
          <h5>{{ i18n "faq" }}</h5>
          <p>{{ i18n "faq-desc" }}</p>
        </a>
      </div>
      <div class="card">
        <a href="https://docs.FreeBSD.org/en/books/fdp-primer/">
          <h5>{{ i18n "fdp" }}</h5>
          <p>{{ i18n "fdp-desc" }}</p>
        </a>
      </div>
      <div class="card">
        <a href={{ "books" | absLangURL }}>
          <h5>{{ i18n "books" }}</h5>
          <p>{{ i18n "books-list" }}</p>
        </a>
      </div>
      <div class="card">
        <a href={{ "articles" | absLangURL }}>
          <h5>{{ i18n "articles" }}</h5>
          <p>{{ i18n "articles-list" }}</p>
        </a>
      </div>
      <div class="card">
        <a href="https://man.FreeBSD.org/cgi/man.cgi">
          <h5>{{ i18n "manual-pages" }}</h5>
          <p>{{ i18n "manual-pages-desc" }}</p>
        </a>
      </div>
    </section>
  </main>
{{ end }}
